package com.my.fo.strategy.organization.existType;

import cn.hutool.core.io.FileUtil;
import com.my.fo.strategy.interfaces.StrategyFactoryName;
import com.my.fo.strategy.organization.inter.OrganizationExistTypeStrategy;

import java.io.File;

@StrategyFactoryName("skip")
public class SkipOrganizationExistTypeStrategy implements OrganizationExistTypeStrategy {
    @Override
    public boolean handlerExist(String inputSrc, String outputSrc) {
        return handlerExist(new File(inputSrc), new File(outputSrc));
    }

    @Override
    public boolean handlerExist(File inputFile, File outputFile) {
        return outputFile == null || FileUtil.exist(outputFile);
    }
}
